﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Snake
{
    class FoodManager
    {
        public IGameComponent Head { get; set; }
        public List<IGameComponent> Components { get; set; }
        public int MaxFoodNum { get; set; }
        private List<Point> freepoints;

        public FoodManager(List<Point> freepoints)
        {
            Components = new List<IGameComponent>();
            this.freepoints = freepoints;
        }

        public void EatFood(IGameComponent aten_food)
        {
            Components.Remove(aten_food);
            freepoints.Add(aten_food.Position);
        }

        public void Refresh(bool refreshflag)
        {
            
        }

        public void Init(List<IGameComponent> components)
        {
            throw new NotImplementedException();
        }
    }
}
